home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Environments / Clean 1.2.4 / PowerMacInterface / scrap.dcl < prev    next >
Encoding:
Modula Definition  |  1997-01-15  |  894 b   |  24 lines  |  [TEXT/3PRM]

  1. definition module scrap;
  2.  
  3. import mac_types;
  4.  
  5. NoScrapErr            :==    -100;            // desk scrap isn't initialized
  6. NoTypeErr            :==    -102;            // no data of the requested type
  7.  
  8. ScrapSize            :==    2400;            // $960 (Long)        size in bytes of desk scrap
  9. ScrapHandle            :==    2404;            // $964 (Long)        handle to desk scrap in memory
  10. ScrapCount            :==    2408;            // $968 (Word)        count changed by ZeroScrap
  11. ScrapState            :==    2410;            // $96A (Word)        tells where desk scrap is
  12. ScrapName            :==    2412;            // $96C (String256)    pointer to scrap filename (preceded by length byte)
  13.  
  14. TextResourceType    :== 0x54455854;        // 'TEXT'
  15. PictResourceType    :== 0x50494354;        // 'PICT'
  16.  
  17. //    Writing to the Desk Scrap
  18. ZeroScrap :: !Toolbox -> (!Int,!Toolbox);
  19. PutScrap :: !Int !Int !Ptr !Toolbox -> (!Int,!Toolbox);
  20. PutScrapText :: !{#Char} !Toolbox -> (!Int,!Toolbox);
  21.  
  22. //    Reading from the Desk Scrap
  23. GetScrap :: !Handle !Int !Toolbox -> (!Int,!Int,!Toolbox);
  24.